package org.nstack.header.network.l3;

import org.nstack.header.message.APIEvent;
import org.nstack.header.rest.RestResponse;


@RestResponse(allTo = "inventory")
public class APIAddIpRangeEvent extends APIEvent {

    private IpRangeInventory inventory;

    public APIAddIpRangeEvent(String apiId) {
        super(apiId);
    }

    public APIAddIpRangeEvent() {
        super(null);
    }

    public IpRangeInventory getInventory() {
        return inventory;
    }

    public void setInventory(IpRangeInventory inventory) {
        this.inventory = inventory;
    }
 
    public static APIAddIpRangeEvent __example__() {
        APIAddIpRangeEvent event = new APIAddIpRangeEvent();
        IpRangeInventory ipRange = new IpRangeInventory();

        ipRange.setL3NetworkUuid(uuid());
        ipRange.setName("Test-IP-Range");
        ipRange.setStartIp("192.168.100.10");
        ipRange.setEndIp("192.168.100.250");
        ipRange.setNetmask("255.255.255.0");
        ipRange.setGateway("192.168.100.1");

        event.setInventory(ipRange);
        return event;
    }

}
